<template>
	<view>
		<web-view
			src="https://vpn.ccufe.edu.cn/portal/#!/login"></web-view>
	</view>
</template>

<script>
	var wv;
	export default {
		data() {
			return {
				url: 'http://10-3-0-1.vpn.ccufe.edu.cn:3030/TMWeb/TimetableSearch/TimetableSearchClassSpan.aspx',
				wSetting: {
					width: '1920px',
					height: '1080px'
				}
			}
		},
		onReady() {
			//设置userAgent代理
			plus.navigator.setUserAgent(
				"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
				);
			// #ifdef APP-PLUS
			var currentWebview = this.$scope.$getAppWebview() //获取当前页面的webview对象
			setTimeout(function() {
				wv = currentWebview.children()[0]
				// console.log(wv);
				wv.setStyle({
						scalable: true,
					}),
					wv.evalJS(`
				alert("双指缩放")
				var metaEl = document.createElement('meta')
				metaEl.setAttribute('name','viewport')
				metaEl.setAttribute('content', 'width=1920px, initial-scale=1,user-scalable=yes')
				document.head.appendChild(metaEl)
				`)
			}, 1000); //如果是页面初始化调用时，需要延时一下
			// #endif
		
		},
	}
</script>


<style lang="scss">

</style>